<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CreateDir.ascx.cs" Inherits="admin_webparts_Plug_ins_Files_CreateDir" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>

<div class="tip">
    <h1><%=LanguageUtility.GetLanguageText("CREATE_DIR", Session)%></h1>
    <table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-top: 20px;">
        <tr>
            <td align="left">
                <a class="path" href="?type=page&name=files&file=%2f"><%=NTTHAO.CommonWeb.WebGlobal.GetSite(System.Web.HttpContext.Current.Session).SiteID%></a> 
                <%
                    string[] parents = this._CurrentPath.Split(new string[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
                    string path = "/";
                    for(int i = 0; i < parents.Length; i++)
                    {
                        string dir = parents[i];
                        path += dir + "/";
                %>
                /&nbsp;<a class="path" href="?type=page&name=files&file=<%=Server.UrlEncode(path) %>"><%=dir%></a>
                <%} %>
            </td>
        </tr>
    </table>
</div>
<%if(this._Message != string.Empty) { %>
<div class="tip tip_highlight">
    <span class="b">Message:&nbsp;</span><span class="red"><%=this._Message %></span>
</div>
<%} %>
<form id="frm" runat="server">
<table cellspacing="0" cellpadding="0" border="1" class="grid" style="margin: 10px auto;">
    <tr class="even">
        <td align="right" width="100px" style="white-space: nowrap;"><%=LanguageUtility.GetLanguageText("DIR_NAME", Session)%>:</td>
        <td>
            <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
        </td>
    </tr>
</table>
<p>
    <span id="spSave1" class="yui-button yui-link-button yuibtn yuibtn-icon btnaddf"><span class="first-child"><asp:Button ID="btnSave1" runat="server" OnClick="btnSave_Click" Text="Save" /></span></span>
    <span id="spCancel1" class="yui-button yui-link-button yuibtn yuibtn-icon btncancel"><span class="first-child"><a href="?type=page&name=files&file=<%=Server.UrlEncode(this._CurrentPath) %>" tabindex="0"><%=LanguageUtility.GetLanguageText("CANCEL", Session)%></a></span></span>
</p>
</form>
<style type="text/css">
    #spCancel1, #spSave1, #spCancel2, #spSave2 {font-size:1.1em; font-weight: bold; }
    #spCancel1 button, #spSave1 button, #spCancel2 button, #spSave2 button { font-family: Verdana,Arial,Helvetica,sans-serif; font-weight: bold; }
</style>
<script type="text/javascript"> 
YAHOO.util.Event.onContentReady("spCancel1", function () {
    var spCancel1 = new YAHOO.widget.Button("spCancel1");
});
YAHOO.util.Event.onContentReady("spSave1", function () {
    var spSave = new YAHOO.widget.Button("spSave1");
});
YAHOO.util.Event.onDOMReady(function() {
    document.getElementById("<%=txtName.ClientID %>").focus();
    document.getElementById("<%=txtName.ClientID %>").select();
});
</script>